<?php

include "connect.php";

if( isset($_POST['productID'])) {} else { header('Location: index.php');}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
	background-image: url(images/background.jpg);
	background-repeat: repeat-x;
	background-position: center top;
	background-attachment: fixed;
	margin: 0px;
	padding: 0px;
}
</style>
<link href="css/yourDetails.css" rel="stylesheet" type="text/css" />
</head>

<?php include "header.php"; ?>

<?php  
$productID=$_POST['productID'];
$productName=$_POST['productName'];
$productCost=$_POST['productCost'];
?>

<div id="content">

<h1>Sorry This Saddle Is On Trial</h1>
<h2>Fill In Your Details Below To Put Your Name Down For Back Order</h2>

<p>This saddle is current on trial by another customer, If you would like to put your name down to purchase this saddle please fill in your details below. We will contact you to advise if the saddle is available once the trial has been complete. By placing a backorder you are under no obligation to have to purchase the saddle, we are offering you the chance to purchase the saddle only if the currant sale doesnt go ahead.</p>

<h3 class="header">Product Details</h3>

<img src="images/saddles/<?php echo $productID ?>_1.jpg" width="250" height="200" />

<div id="productDetails">
<p>
<b>Product ID:</b> <?php echo $productID ?><br /><br />
<b>Product Name:</b> <?php echo $productName ?><br /><br />
<b>Product Cost:</b> <?php echo $productCost ?><br /><br />

</p>
</div>

<h3 class="header">Your Details</h3>

<form action="sendyourDetails.php" method="post" name="sendBackOrder">

<select class="smallField" name="title">
  <option value="Mr">Mr</option>
  <option value="Mrs">Mrs</option>
  <option value="Miss">Miss</option>
  <option value="Ms">Ms</option>
  <option value="Other">Other</option>
</select>

<input name="name" type="text" class="mediumField" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value == '') this.value =this.defaultValue" value="Your Name" />

<input name="contactNumber" type="text" class="mediumField" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value == '') this.value =this.defaultValue" value="Contact Number" />

<h3 class="header">Address Details</h3>

<input name="postcode" type="text" class="smallField" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value == '') this.value =this.defaultValue" value="Postcode" />

<input name="addressLine1" type="text" class="mediumField" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value == '') this.value =this.defaultValue" value="Address Line 1" />

<input name="addressLine2" type="text" class="mediumField" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value == '') this.value =this.defaultValue" value="Address Line 2" />

<br />
<br />

<input name="Town" type="text" class="mediumField" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value == '') this.value =this.defaultValue" value="Town" />

<input type="hidden" value="<?php echo $productID ?>" name="productID" />
<input type="hidden" value="<?php echo $productName ?>" name="productName" />
<input type="hidden" value="<?php echo $productCost ?>" name="productCost" />

<input id="sendButton" name="sendButton" type="submit" value="Place Backorder" />

</form>
</div>
<!--Content #End-->

<?php include"footer.php" ?>


</body>
</html>